import FontFamily from '@tiptap/extension-font-family';
import TextStyle from '@tiptap/extension-text-style';
import Highlight from '@tiptap/extension-highlight';
import Color from '@tiptap/extension-color';
import TaskList from '@tiptap/extension-task-list';
import TaskItem from '@tiptap/extension-task-item';
import Underline from '@tiptap/extension-underline';
import Image from '@tiptap/extension-image';
import Table from '@tiptap/extension-table';
import TableRow from '@tiptap/extension-table-row';
import TableCell from '@tiptap/extension-table-cell';
import TableHeader from '@tiptap/extension-table-header';
import CharacterCount from '@tiptap/extension-character-count';

export const extensions = [
  FontFamily.configure({
    types: ['textStyle'],
  }),
  TextStyle.configure({
    HTMLAttributes: {
      class: 'custom-text-style',
    },
  }),
  Highlight.configure({
    multicolor: true,
  }),
  Color,
  TaskList,
  TaskItem,
  Underline,
  Image,
  Table.configure({
    resizable: true,
  }),
  TableRow,
  TableCell,
  TableHeader,
  CharacterCount.extend().configure({
    limit: 10000,
  }),
];